package designpattern.demo.creational.singletonpattern;
/**
 * 单线程环境下的懒汉式单例模式
 * @author ywq
 *
 *
 */
public class SingleLazy {

    private static SingleLazy s = null;
    private SingleLazy(){}

    public static  SingleLazy getInstance()
    {
        // 如果没有实例再加载
        if(s==null)
            s = new SingleLazy();
        return s;
    }


}
